/*
 * admin  apikey列表搜索
 * @Author: ljb
 * @Date: 2018-03-27 17:51:07
 * @Last Modified by: ljb
 * @Last Modified time: 2019-11-08 10:53:50
 */
<style lang="less" rel="stylesheet/less" type="text/less">
	.user-search-form {
		// padding-left: 40px;
		.ivu-form-item-label {
            font-size: 16px;
            padding-left: 20px;
		}
	}
</style>

<template>
	<Form
		ref="formInline"
		name="user_query__form"
		class="user-search-form"
		inline
		@keydown.native.enter.prevent="confirmSearch">

		<Form-item
			:label-width="100"
			label="用户名称">
			<i-input
				v-model="formValidate.name"
				placeholder="请输入用户名"
				name="admin_query__username"
				size="large"/>
		</Form-item>

		<Form-item
			:label-width="180"
			label="手机号码">
			<i-input
				v-model="formValidate.phone"
				placeholder="请输入手机号码"
				name="admin_query__phone"
				size="large"/>
		</Form-item>

		<Form-item
			:label-width="180"
			label="apikey状态" >
			<Select
				v-model="formValidate.status"
				:style="{width: '150px'}"
				name="user_query__status"
				size="large"
				clearable>
				<Option
					v-for="option in options"
					:value="option.value"
					:key="option.value">{{ option.label }}</Option>
			</Select>
		</Form-item>

		<Form-item>
			<Button
				type="primary"
				name="user_query__search"
				@click="confirmSearch">
				搜索
			</Button>
		</Form-item>

	</Form>
</template>
<script>

export default {

	data() {
		return {

			options: [
				{
					value: '0',
					label: '正常',
				},
				{
					value: '1',
					label: '锁定',
				},
			],

			formValidate: {
				name: '',
				phone: '',
				status: '',
			}, // 搜索框的对象参数
		};
	},

	methods: {

		/**
         * 确认搜索
         * @return {undefined}
         */
		confirmSearch() {

			this.$emit('search', this.formValidate);
		},

	},

};

</script>
